home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
011-020
/
amok19
/
smallinout
/
test2.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
957b
|
36 lines
MODULE Test2;
FROM InOut IMPORT Write, WriteLn, WriteString, WriteInt, WriteHex,
ReadString, ReadInt, ReadLongInt, Read;
FROM ASCII IMPORT eof,lf;
VAR
c: CHAR;
s: ARRAY [0..79] OF CHAR;
i: INTEGER;
l: LONGINT;
BEGIN
FOR c:="A" TO "Z" DO Write(c) END; WriteLn;
WriteLn;
WriteString("123456 "); WriteInt(123456,7); Write(" "); WriteHex(123456,6); WriteLn;
WriteString("-67890 "); WriteInt(-67890,7); Write(" "); WriteHex(-67890,6); WriteLn;
WriteLn;
WriteString("String eingeben: "); ReadString(s);
WriteString("String war: "); WriteString(s); WriteLn;
WriteLn;
WriteString("Integer eingeben: "); ReadInt(i);
WriteString("Integer war: "); WriteInt(i,10);
WriteLn;
WriteString("Longint eingeben: "); ReadLongInt(l);
WriteString("Longint war: "); WriteInt(l,10); WriteLn;
WriteLn;
WriteString("Chars eingeben: ");
REPEAT
Read(c);
Write(c);
UNTIL c=lf;
WriteLn;
END Test2.